
import { connect } from 'react-redux'
import React, { useState } from 'react';
import { Button, Modal } from 'antd';

export const DelModel = ({delModalshow,closeDelModel,delIndex,delkefuName,dispatch}:any) => {
    
// 点击关闭弹窗 删除数据
  const handleOk = () => {
    closeDelModel(false)
    dispatch({type:"kefu/DEL",payload:delIndex})
  };

//   取消关闭弹窗
  const handleCancel = () => {
    closeDelModel(false);
  };
  return (
    <div>
      
      <Modal title="信息" open={delModalshow} onOk={handleOk} onCancel={handleCancel}>
        <p>确定要删除{delkefuName}么</p>
      </Modal>
    </div>
  )
}

const mapStateToProps = (state:any) =>{
    return{

    }
}



export default connect(mapStateToProps)(DelModel)